home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d21
/
dvglue.arc
/
TVWPRNTF.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-09
|
2KB
|
59 lines
/*================================================*/
/* TVWPRNTF.C */
/* */
/* (c) Copyright 1988 Ralf Brown */
/* All Rights Reserved */
/* May be freely copied for noncommercial use as */
/* long as this copyright notice is kept intact */
/* and any changes are indicated in the comment */
/* blocks for the functions */
/*================================================*/
/* Unlike most other functions, TVwin_printf() is */
/* definitely nonportable, and requires Turbo C */
/*================================================*/
#include <stdio.h>
#include <stdarg.h>
#include "tvapi.h"
/*================================================*/
static OBJECT _mutex_ = NIL ;
/*================================================*/
int pascal __vprinter( void pascal (*putter)(char *,int,void *),
void *outP,
char *format,
va_list argP ) ;
/*================================================*/
/* printf_put internal func to output formatted */
/* string */
/* Ralf Brown 5/9/88 */
/*================================================*/
static void pascal printf_put( char *s, int len, void *win )
{
TVwin_write( *(OBJECT *)win, s, len ) ;
}
/*================================================*/
/* TVwin_printf formatted output to window */
/* Ralf Brown 5/9/88 */
/*================================================*/
int cdecl TVwin_printf(OBJECT win,char *format, ...)
{
int retval ;
if (_mutex_ == NIL)
_mutex_ = TVmbx_new() ;
TVlock(_mutex_) ;
retval = __vprinter( printf_put, &win, format, _va_ptr ) ;
TVunlock(_mutex_) ;
return retval ;
}
/* End of TVWPRNTF.C */